package com.itheima.demo05.PrintStream;

import java.io.FileNotFoundException;
import java.io.PrintStream;

public class Demo02PrintStream {
    public static void main(String[] args) throws FileNotFoundException {
        System.out.println("我是在控制台输出");
        PrintStream ps=new PrintStream("day10_IO\\目的地是打印流.txt");
        System.setOut(ps);
        System.out.println("我是在打印流的目的地中输出的");
        System.out.println("哈哈");
        ps.close();
    }
}
